package org.reference.generic.base;

import java.util.HashMap;
import java.util.Map;

/**
 * 
 */
public class Parameter {

	public static final String TYPE_MAX_DEPTH 		= "MAX_DEPTH";
	public static final String TYPE_DEPTH 			= "DEPTH";
	public static final String TYPE_ARITY 			= "ARITY";
	public static final String TYPE_TERM_VALUE 		= "TERM_VALUE";
	public static final String TYPE_MACHINE_STEP 	= "MACHINE_STEP";
	public static final String TYPE_REPRODUCTION_RATE= "REPRODUCTION_RATE";
	public static final String TYPE_MUTATION_RATE 	= "MUTATION_RATE";
	public static final String TYPE_CROSSOVER_RATE 	= "CROSSOVER_RATE";
	public static final String TYPE_GENERATION 	= "GENERATION";            //정의: generation은 reference cmax갯수와 동일한 숫자여야됨. reference cmax와 process를 실행하여 얻은 cmax 값과 비교하기 위
	public static final String TYPE_GENE_POPULATION = "GENE_POPULATION";
	public static final String TYPE_REFERENCE_SIZE = "REFERENCE_SIZE";
	
	
	public static final String TYPE_VALUE_RM	= "TYPE_RM";
	public static final String TYPE_VALUE_PT	= "TYPE_PT";
	public static final String TYPE_VALUE_CT	= "TYPE_CT";
	public static final String TYPE_VALUE_RP	= "TYPE_RP";
	
	Map<String, String> params = new HashMap<String, String>();
	
	
	/**
	 * 
	 */
	public void addParameter(String name, String value) {
		
		params.put(name, value);
		
    }
	
    /**
     * 
     */
    public Parameter() {
    }

    /**
     * 
     */
 
    /**
     * @return
     */
    public String getValueToString(String name) { //
    	
        return params.get(name);
    }

    /**
     * @return
     */
    public int getValueToInt(String name) {
        return Integer.valueOf(getValueToString(name));
    }

    /**
     * @return
     */
    public float getValueToFloat(String name) {
        return Float.valueOf(getValueToString(name));
    }

    /**
     * @return
     */
    public double getValueToDouble(String name) {
       
        return Double.valueOf(getValueToString(name));
    }

    /**
     * 
     */
}